package com.gongpingjialoan.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2016/10/9.
 */
public class Domain implements Parcelable {

    private String name;
    private String value;
    private boolean isCheck;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public boolean isCheck() {
        return isCheck;
    }

    public void setIsCheck(boolean isCheck) {
        this.isCheck = isCheck;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.value);
        dest.writeByte(isCheck ? (byte) 1 : (byte) 0);
    }

    public Domain() {
    }

    protected Domain(Parcel in) {
        this.name = in.readString();
        this.value = in.readString();
        this.isCheck = in.readByte() != 0;
    }

    public static final Parcelable.Creator<Domain> CREATOR = new Parcelable.Creator<Domain>() {
        public Domain createFromParcel(Parcel source) {
            return new Domain(source);
        }

        public Domain[] newArray(int size) {
            return new Domain[size];
        }
    };
}
